from random import randrange

def hunt_choices(round_number, current_food, current_reputation, m, player_reputations):   
    """
        let's consider parabola with vertice in (0.5, 1/3) 
        and crossing X axis in points 0 and 1.
        
        reputation of each player is in [0.0, 1.0], so let's assume that
        X axis is reputation of i-th player and Y axis is probability that we will hunt
    """

    def f(x):
        return (-4./3.)*((x - 0.5)**2) + 1./3.  # equation of the parabola

    hunt_decisions = []
    hunt_probabilities = []
    
    # calculating probabilities
    for x in range(1, 11):
        hunt_probabilities.append(f(x/10.))
    
    for rep_i in player_reputations:
        hunt_pr = hunt_probabilities[int(round(rep_i * 10.)) - 1]
        random_decision = randrange(0, 1000000) / 1000000.

        if random_decision <= hunt_pr:
            hunt_decisions.append('h')
        else:
            hunt_decisions.append('s')            

    return hunt_decisions

def hunt_outcomes(food_earnings):
    pass # do nothing

def round_end(award, m, number_hunters):
    pass # do nothing

# test:
# print hunt_choices(1, 1, 1, 1, [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0])
